package com.pingan.glue.gluegame.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.pingan.glue.gluegame.entity.FaceFieldEntity;
import com.pingan.glue.gluegame.entity.FriendUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 人脸属性
 *
 */
@Mapper
public interface FaceFieldDao extends BaseMapper<FaceFieldEntity> {

    @Update("UPDATE `glue-game`.face_field SET mobile = #{mobile}, group_id = #{groupId}, expression = #{expression}," +
            " face_shape = #{faceShape}, beauty = #{beauty}, gender = #{gender}, race = #{race}, face_probability = #{faceProbability}, glasses = #{glasses}, " +
            "emotion = #{emotion}, face_type = #{faceType}, face_token = #{faceToken}," +
            " face_path = #{facePath}, age = #{age}," +
            " occupation = #{occupation}, blood_type = #{bloodType}, constellation = #{constellation}, update_time =#{updateTime} " +
            "WHERE user_id = #{userId}")
    Integer updateByUserId(FaceFieldEntity entity);

    @Select("select * from face_field where user_id=#{userId}")
    FaceFieldEntity queryByuserId(Long userId);


}
